package com.ficus.road.maintain.service;

import com.ficus.road.maintain.dao.xlj.XljDao;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author xiawen yang
 * @date 2022/8/19 下午3:55
 */
@Service
@RequiredArgsConstructor
public class XljService {
    private final XljDao xljDao;

    public void clearXljCameraList() {
        xljDao.findAll().forEach(xlj -> {
            xlj.getCameras().clear();
            xljDao.saveOrUpdate(xlj);
        });
    }
}
